{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src='http://www-scf.usc.edu/~ghasemig/images/sharif.png' alt=\"SUT logo\" width=200 height=200 align=left class=\"saturate\" >\n",
    "\n",
    "<br>\n",
    "<font face=\"Times New Roman\">\n",
    "<div dir=ltr align=center>\n",
    "<font color=0F5298 size=7>\n",
    "    ML for Bioinformatics <br>\n",
    "<font color=2565AE size=5>\n",
    "    Computer Engineering Department <br>\n",
    "<font color=3C99D size=5>\n",
    "    Homework 3: Practical - Multi-Layer Perceptron (VAE) <br>\n",
    "<font color=696880 size=4>\n",
    "    Sobhan Moghimi (sobhanmoghimi45@gmail.com) <br>\n",
    "    Fakhredin Abdi (fakhredinabdi80@gmail.com) <br>\n",
    "    \n",
    "____\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Full Name : \n",
    "### Student Number : \n",
    "__"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "Hnkccv8vVT-o"
   },
   "source": [
    "# Description"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "A9Itv81cfTG4"
   },
   "source": [
    "**In this assignment you'll be working with Dorothea Dataset.**\n",
    "\n",
    "DOROTHEA is a drug discovery dataset. Chemical compounds represented by structural molecular features must be classified as active (binding to thrombin) or inactive.\n",
    "To find out more about dataset, refer to this link: https://archive.ics.uci.edu/ml/datasets/Dorothea\n",
    "\n",
    "You should implement a classifier with Neural Networks and for this purpose we will be using PyTorch as framework."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "zqSzHiJuUh7V"
   },
   "source": [
    "# Importing libraries, modules and Dataset."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "TlMDVS1gV08L"
   },
   "source": [
    "In this part, import all the libraries and modules needed to solve the problem."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "WgjSY5BaViF2"
   },
   "outputs": [],
   "source": [
    "import os\n",
    "import random \n",
    "import torch \n",
    "import torch.nn as nn\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "RSBb23wYV2Ho"
   },
   "source": [
    "Now import the train and test data from dataset."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "jNaH5szYV9Y4"
   },
   "outputs": [],
   "source": [
    "# Your code here"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "RgEJNhp_UiEa"
   },
   "source": [
    "## Normalize\n",
    "You can normalize your data using <code>Scikit-Learn</code> modules here."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Apply normalization here\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "pQVOozI3Gjdv"
   },
   "source": [
    "## Dimensionality Reduction\n",
    "There are too many attributes for each instance of dataset. We will suffer from sparse data and long training phase. Thus you can reduce dimensions to get better accuracy. \n",
    "\n",
    "Principal component analysis (PCA) is the process of computing the principal components and using them to perform a change of basis on the data.\n",
    "\n",
    "Apply PCA on Dorothea dataSet using <code>Scikit-Learn</code>."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "wrdakV-5ZsRP"
   },
   "outputs": [],
   "source": [
    "# Apply PCA here\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "jFTEH0H23BtL"
   },
   "source": [
    "# Define Model\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "1z8_ahC_3S5f"
   },
   "outputs": [],
   "source": [
    "# Define your model in here\n",
    "# You can change the code below.\n",
    "\n",
    "class ClassifierModel(nn.Module):\n",
    "    def __init__(self):\n",
    "        pass\n",
    "\n",
    "    def forward(self, x):\n",
    "        pass"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "IGUFUbsw3n9A"
   },
   "source": [
    "# Train the model"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "YDrS8le13n25"
   },
   "source": [
    "**Initialize model, define hyperparameters, optimizer, loss function, etc.**\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "YV0FgUYc4J-Y"
   },
   "outputs": [],
   "source": [
    "# Implement Train in here\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "L2Fnamnk4LTV"
   },
   "source": [
    "**After the training process, plot metrics such as loss function values.**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "3br2A_3x7tLY"
   },
   "outputs": [],
   "source": [
    "# Plot in here\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "vbwXdL9Ph2jD"
   },
   "source": [
    "# Testing\n",
    "After training, test your model on test dataset and compute performance metrics. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "hzuhWfc3ia5s"
   },
   "outputs": [],
   "source": [
    "# Implement Test in here\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "vqQpZsTEh2gL"
   },
   "source": [
    "Show confusion matrix of your model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Kl9VOLgdiFMg"
   },
   "outputs": [],
   "source": [
    "# Print your confusion matrix here.\n"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [
    "Hnkccv8vVT-o",
    "RgEJNhp_UiEa",
    "pQVOozI3Gjdv",
    "jFTEH0H23BtL",
    "IGUFUbsw3n9A",
    "vbwXdL9Ph2jD"
   ],
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
